package co.fitstart.entity.coach;

public enum CoachRestType {
    
    REST("rest", "休息"),
    
    EXPERIENCE("experience", "体验课"),
    
    DUTY("duty", "值班"),
    
    BUSINESS("business", "公出"),
    
    ANNUAL_LEAVE("annual-leave", "特色75min"),
	
	CONFERENCE("conference", "会议"),
	
	TRAINING("training","培训");
    
    private String alias;
    
    private String description;
    
    private CoachRestType(String alias, String description) {
        this.alias = alias;
        this.description = description;
    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static CoachRestType aliasOf(String alias) {
        for (CoachRestType coachRestType : CoachRestType.values()) {
            if (coachRestType.getAlias().equalsIgnoreCase(alias)) {
                return coachRestType;
            }
        }
        
        return null;
    }
    
    /**
     * 
     * @return
     */
    public boolean isRest() {
        return this.equals(REST);
    }
    
    /**
     * 
     * @return
     */
    public boolean isExperience() {
        return this.equals(EXPERIENCE);
    }
    
    /**
     * 
     * @return
     */
    public boolean isBusiness() {
        return this.equals(BUSINESS);
    }
    
    /**
     * 
     * @return
     */
    public boolean isDuty() {
        return this.equals(DUTY);
    }
    
    /**
     * 
     * @return
     */
    public boolean isConference(){
    	return this.equals(CONFERENCE);
    }
    
    /**
     * 
     * @return
     */
    public boolean isTraining(){
    	return this.equals(TRAINING);
    }
    
    /**
     * @return the alias
     */
    public String getAlias() {
        return alias;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param alias the alias to set
     */
    public void setAlias(String alias) {
        this.alias = alias;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

}
